package com.tianqu.tms.www.check.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.tianqu.tms.core.base.TmsAjaxAction;
import com.tianqu.tms.core.base.UserContext;
import com.tianqu.tms.core.exception.TmsException;
import com.tianqu.tms.entity.Member;

public class CheckCarPrintGetMemberInfoAjaxAction extends TmsAjaxAction {

	@Override
	public void process(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response,
			UserContext uc) throws TmsException {
		String cardNo = request.getParameter("cardNo");
		String str = "";
		Member member = new Member();
 		member = member.getIntegralManagementInfo(cardNo);
		if(member!=null)
		{
			//商户名 商户id 商户类型  积分 有效性
 			str =member.getRealName()+","+member.getMemId()+",1,"+member.getUserId()+","+member.getCardScore();
		}else{
			str = "1";//卡号无效
		}
		String responseText = str.toString();
		responseValues(response, responseText, TEXT);
	}
}